package com.leyou.item.mapper;

import com.leyou.item.entity.Spu;
import com.leyou.item.entity.SpuDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @version V1.0
 * @author: Ljxpa
 * @date: 2020/03/07 20:05
 * @description:
 */
public interface SpuMapper extends Mapper<Spu> {
	@Select("select * from tb_spu_detail where spu_id  in (select id from tb_spu where cid1 =#{cid} or cid2 =#{cid} or cid3 =#{cid}) limit 0,1")
	SpuDetail querySpuDetailByCid(@Param("cid") Long cid);
}
